//
//  IntroduceViewController.m
//  XDLBaseProject
//
//  Created by 谢东来 on 2019/9/17.
//  Copyright © 2019 Apple. All rights reserved.
//

#import "IntroduceViewController.h"

@interface IntroduceViewController ()

@property (strong, nonatomic) UIScrollView *scrollView;

@end

@implementation IntroduceViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"介绍";
    self.view.backgroundColor = [UIColor whiteColor];
    [self createSubViews];
}

- (void)createSubViews {
    self.scrollView = [[UIScrollView alloc] initWithFrame:(CGRectMake(0, 0, kScreenW, kScreenH - kTopBarH))];
    //    self.scrollView.backgroundColor = randomColor;
    //    self.scrollView.bounces = NO;
    self.scrollView.contentSize = CGSizeMake(kScreenW, kScreenW*1.57-(kScreenH-kTopBarH));
    [self.view addSubview:self.scrollView];

//    UIImageView *imv = [[UIImageView alloc] initWithFrame:(CGRectMake(0, 0, kScreenW, kScreenW*1.57))];
//    imv.image = [UIImage imageNamed:@"introduce_text.png"];
//    [self.scrollView addSubview:imv];
    
    UIView *v = [UIView newAutoLayoutView];
    [self.view addSubview:v];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeLeft) withInset:X_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeRight) withInset:X_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeTop) withInset:Y_Real(10)];
    [v autoPinEdgeToSuperviewEdge:(ALEdgeBottom) withInset:Y_Real(10)];

    UILabel *lab = [UILabel newAutoLayoutView];
    lab.textColor = UIColorFromHex(0x292421);
    lab.numberOfLines = 0;
    lab.font = [AppFont getFont_14];
    [v addSubview:lab];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeLeft)];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeRight)];
    [lab autoPinEdgeToSuperviewEdge:(ALEdgeTop)];
    lab.text = [NSString stringWithFormat:@"        浏览Web时遇到有价值的网页，通常保存在浏览器自带的收藏夹内。但若遇到内容改版或网站无法访问等情况，会丢失很多重要信息。WebPageSaver是一款能够以PDF、图像和单一完整HTML页面形式保存网页的工具，该工具以URL作为输入，通过内置工具将网页转化成pdf、jpg（或png）、html的形式，保存在文件夹中，便于后续应用。\n\n         使用方法:\n\n        1.单独使用\n        WebPageSaver单独运行时为一个使用iOS内置浏览器的应用，输入URL后开启页面，并提供保存功能。\n\n        2.配合浏览器使用\n        在Safari浏览器中浏览到目标网页,然后通过分享的方式，可以将网页URL发送至WebPageSaver,之后打开app会提示跳转相应的分享"];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
